<#if realList.tab?? && realList.tab.itemList?size gt 0>
    <#list tab_item_list as item>
    function loadGrid${item.id}(){

    $('#GridTable').datagrid({
    url:TDQS.CONTEXT_PATH+'business/list.action?ajaxLoadType=1&tdqssid='+TDQS.SESSION_ID,
    queryParams:$.extend(getFormParams('hiddenForm'),getFormParams('searchForm')),
    idField:"id",
    pageNumber:${pager.currentPage?default(1)},
    pageSize:${pager.pageSize?default(1)},
    sortName: "<#if sort??>${sort}</#if>",
    sortOrder: "<#if order??>${order}</#if>",
    <#if realList.isPaging?? && realList.isPaging=='0'>pagination:false,</#if>
    frozenColumns:[[
        <#if !(list.isShowCheck?? && list.isShowCheck=="0")>
        {field : 'ck',checkbox : true,defaultValue : ''},
        </#if>
    {field : 'indexer',title : '序号',width : 30,formatter:${"$"}.fn.datagrid.defaults.indexFormatter,edit : false,align : 'center',defaultValue : ''}
        <#list item.realListFieldList as listField>
            <#if listField.frozen?? && (realList.id==list.id || (realList.id!=list.id && listField.list.id==realList.id)) && listField.frozen=='1' && (!listField.isHidden?? || listField.isHidden=='0')>
            ,{field : '${listField.field.name}',title : '${listField.title}',width : ${listField.width},editor : 'text',defaultValue : <#if listField.defaultValue??>'${listField.defaultValue}'<#else>''</#if>,align : <#if listField.align??>'${listField.align}'<#else>'center'</#if>,edit : true,sortable : <#if listField?? && listField.sortable?? && listField.sortable=="1">true<#else>false</#if>,formatter:getTitleFormatter('${listField.field.name}')}
            </#if>
        </#list>
    ] ],
    columns:[[
        <#if realList.isHierarchyTitle?? && realList.isHierarchyTitle=='1'>
            <#assign index=0>
            <#list item.fieldListList as fieldList>
                <#if index gt 0 && index lt item.fieldListList?size>
                ],[
                </#if>
                <#assign fieldIndex=0>
                <#list fieldList as listField>
                    <#if (!listField.frozen?? || listField.frozen=='0') && (!listField.isHidden?? || listField.isHidden=='0')>
                        <#if fieldIndex gt 0>
                        ,
                        </#if>
                        <#if listField.isTitle?? && listField.isTitle == "1">
                        {field:'',title:'${listField.title}',width:${listField.width},rowspan:<#if listField.rowSpan??>${listField.rowSpan}<#else>1</#if>,colspan:<#if listField.colSpan??>${listField.colSpan}<#else>1</#if>}
                        <#else>
                        {field : '${listField.field.name}',title : '${listField.title}',width : ${listField.width},editor : 'text',rowspan:<#if listField.rowSpan??>${listField.rowSpan}<#else>1</#if>,colspan:<#if listField.colSpan??>${listField.colSpan}<#else>1</#if>,defaultValue : <#if listField.defaultValue??>'${listField.defaultValue}'<#else>''</#if>,align : <#if listField.align??>'${listField.align}'<#else>'center'</#if>,edit : true,sortable : <#if listField?? && listField.sortable?? && listField.sortable=="1">true<#else>false</#if>,formatter:getColumnFormatter('${listField.field.name}',<#if listField?? && listField.linkFunction?? && listField.linkable>true,'<#if listField.linkFunction.id??>${listField.linkFunction.id}</#if>','<#if listField.linkFunction.businessProcess?? && listField.linkFunction.businessProcess.id??>${listField.linkFunction.businessProcess.id}</#if>','<#if listField.linkFunction.clearSession??>${listField.linkFunction.clearSession}</#if>','<#if listField.field.id??>${listField.field.id}</#if>'<#else>false</#if>)}
                        </#if>
                        <#assign fieldIndex=fieldIndex+1>
                    </#if>
                </#list>
                <#if index == 0>
                    <#if list.allowOperColumn?? && list.allowOperColumn=="1">
                    ,
                    {field : 'opt',title : '操作',width : <#if list.operColumnWidth??>${list.operColumnWidth}<#else>200</#if>,align : 'center',rowspan : 2,formatter:getOperFormatter}
                    </#if>
                </#if>
                <#assign index=index+1>
            </#list>
        <#else>
            <#assign index=0>
            <#list item.realListFieldList as listField>
                <#if listField.field?? && (!listField.frozen?? || listField.frozen=='0') && (realList.id==list.id || (realList.id!=list.id && listField.list.id==realList.id)) && (!listField.isHidden?? || listField.isHidden=='0')>
                    <#if index gt 0>
                    ,
                    </#if>
                {field : '${listField.field.name}',title : '${listField.title}',width : ${listField.width},editor : 'text',defaultValue : <#if listField.defaultValue??>'${listField.defaultValue}'<#else>''</#if>,align : <#if listField.align??>'${listField.align}'<#else>'center'</#if>,edit : true,sortable : <#if listField?? && listField.sortable?? && listField.sortable=="1">true<#else>false</#if>,formatter:getColumnFormatter('${listField.field.name}',<#if listField?? && listField.linkFunction?? && listField.linkable>true,'<#if listField.linkFunction.id??>${listField.linkFunction.id}</#if>','<#if listField.linkFunction.businessProcess?? && listField.linkFunction.businessProcess.id??>${listField.linkFunction.businessProcess.id}</#if>','<#if listField.linkFunction.clearSession??>${listField.linkFunction.clearSession}</#if>','<#if listField.field.id??>${listField.field.id}</#if>'<#else>false</#if>)}
                    <#assign index=index+1>
                </#if>
            </#list>
            <#if list.allowOperColumn?? && list.allowOperColumn=="1">
            ,
            {field : 'opt',title : '操作',width : <#if list.operColumnWidth??>${list.operColumnWidth}<#else>200</#if>,align : 'center',rowspan : 2,formatter:getOperFormatter}
            </#if>
        </#if>
    ] ],
    operations:{},
    loadSuccess:function(){
    $('#GridTable').datagrid("options").url=TDQS.CONTEXT_PATH+'business/list.action?tdqssid='+TDQS.SESSION_ID;
    }
    });

    }
    </#list>
</#if>